package Lexical;

public class Token 
{
	public Tag tag;	
	public int line;
	
	/**
	 * Constructor of a Token.
	 * @param tag a Tag object that represents the name of the Token.
	 */
	public Token (Tag tag) 
	{ 
		this.tag = tag; 
	}
	
	/**
	 * Constructor of a Token.
	 * @param tag a Tag object that represents the name of the Token.
	 * @param line the line of the code where the token was found.
	 */
	public Token (Tag tag, int line) 
	{ 
		this.tag = tag; 
		this.line = line;
	}
	
	/**
	 * Returns a String representations of the token's tag
	 */
	public String toString()
	{
		return tag.toString();
	}
}
